package com.example.comparator;

import cn.hutool.core.collection.ListUtil;
import javafx.collections.transformation.SortedList;
import org.junit.Test;

import java.math.BigDecimal;
import java.util.Comparator;
import java.util.List;
import java.util.function.Function;

/**
 * @author csp 2022-11-11
 */
public class SortTest {

    @Test
    public void test(){

        List<BigDecimal> of =
                ListUtil.toList(BigDecimal.valueOf(1), null, BigDecimal.valueOf(2));

        of.sort(Comparator.nullsLast(Comparator.naturalOrder()));
        System.out.println(of);
    }
}
